strict: true

import Vue from 'vue'
import Vuex from 'vuex'

import render_store from "./modules/render_store"
import bpmn_store from "./modules/bpmn_store"
import abc from "./modules/abc"

import getters from "./getters"

Vue.use(Vuex)

export default new Vuex.Store({
  // strict: strict: process.env.NODE_ENV !== 'production',//严格模式会深度监测状态树来检测不合规的状态变更——请确保在发布环境下关闭严格模式，以避免性能损失。
  state: {
    msg: '测试数据',
    num: 0,
  },
  mutations: {
    changeMsg(state, obj) {
      state.msg = '异步改变数据'
    },
    changeNum(state, obj) {
      console.log(state, obj)
      state.num++
    },
  },
  actions: {
    changeMsg(store) {
      window.setTimeout(() => {
        store.commit('changeMsg', {
          name: 'deng',
        })
      })
    },
  },
  modules: {
    abc,
    render_store,
    bpmn_store
  },
  getters
})
